This invention relates generally to field of computer processing and more specifically relates to managing multiple physical paths from a host computer system to peripheral devices.
Advances in computer processor architecture have resulted in increased processing speeds up to and beyond one gigahertz. One aspect of computer development then has been directed to having tasks immediately available for these fast busy processors. Management of internal resources to keep the processor busy may include both hardware and software multithreading registers, cache management, pipeline allocation, branch prediction, etc. The external resources may refer to external disk drives, external memory storage, printing, network communication, etc. Typically, management of data for processing along these multiple external pathways, which are usually multiple buses of various protocols to and from these attached peripheral devices, has been relegated to the host operating system and/or the host device driver software applications. Typically during processing to these peripheral devices, the host operating system executes a device driver application or function so that it can communicate with an adapter connected to the peripheral device. The system""s operating system executes, for example, an application program until an interrupt or some instruction in the program indicates that a peripheral device needs data, has the required data, or otherwise requires attention. A conventional context switch procedure changes the context of the host processing system between the device driver and the application program that had been executing.
Given the increasing complexity and pervasiveness of today""s computer systems and the increased reliance by the users upon these systems, the management of the physical pathways to/from a host computer system has been a neglected aspect of information handling systems. There are, moreover, multiple buses of many different protocols; just to name a few of the protocols: PCI and PCI-X, Token Ring, Gigabyte Ethernet, Ethernet, Fibre Channel, SSA, Fiber Channel Arbitrated Loop (FCAL), Ultra3 SCSI, Infiniband, FDDI, ATM, 1394, ESCON, wireless relays, Twinax, LAN connections, WAN connections, high performance graphics, etc. It is a management nightmare for the operating system to track and maintain the state of all these buses and their various protocols and schemes for ordering or prioritizing commands. A processor""s efficiency is severely compromised if it has to manage data transfer on all these various buses at the same time. Bus protocols, moreover, are constantly evolving and moving towards industry standardization but until then connecting to a new device may involve connecting to a new bus with its own proprietary protocol.
Increasingly so in computer systems, there may be more than one physical pathway from an adapter to its peripheral or external device. One method to manage external bus traffic that is becoming increasingly congested is to use devices with multiple ports, each port having its own I/O adapter that may or may not have a shared or unique cache and with each port having a distinct independent physical pathway to the same external device. Usually, the allocation of one pathway as the primary pathway and another or others as backup pathway(s) is statically assigned in microcode at initialization by the host operating system or the device driver. The host operating system may be aware of the multiple pathways, or may just consider each physical path as a different device. In the latter scenario, even though one device X is connected to the host computer system through a dual-ported adapter and there are two independent physical paths to device X, the host operating system sees two devices with the same name X. In any event, to change or reroute data from the primary to the backup path, the host computer""s operating system becomes involved.
The host operating system may have difficulty maintaining cache coherency of adapter caches if there is a separate cache in the adapter for each pathway to the same device. For example, imagine that the host wants to access an external memory device having independent physical paths each with its own adapter. The cache associated with one physical path may have an outstanding WRITE command that hasn""t been executed but before it can write the fresh data to the memory location in the peripheral device, a READ command that actually issued after the WRITE command accesses that memory location on the other path and obtains undetected stale data. Because the problem is undetected, no error is generated. Thus, there is a need to maintain cache coherency within an adapter and manage the appropriate sequencing of commands on the same or different physical paths to a device having multiple pathways.
At the present time, there is no mechanism for dynamic usage and load balancing amongst the redundant physical paths. Once a physical path has failed, moreover, the host operating system has no simple means to dynamically use alternate paths or to recover use of the failed path once it becomes available. It is further desirable to adapt to new devices and new physical paths without involving complications to the operating system of the host computer, i.e., it is important to be able to attach new and different devices to a host computer system independently of the operating system. Investments in new and/or unique hardware and/or packaging every time a new peripheral device is installed is unacceptable in today""s paradigm of modular computing.
It is thus an object of the invention to provide for efficient computing resources by the management of multiple independent pathways to a computer system""s peripheral devices.
Other objects, features, and characteristics of the invention; methods, operation, and functions of the related elements of the structure; combination of parts; and economies of manufacture will become apparent from the following detailed description of the preferred embodiments and accompanying Drawing, all of which form a part of this specification, wherein like reference numerals designate corresponding parts in the various figures.
To satisfy this objective and others in a computer system, a method of managing command and data flow to peripheral devices is disclosed, the method comprising the steps of determining the number of independent physical paths to at least one peripheral device connected to the computer system, resolving all the different independent physical paths to the peripheral device into one logical path, presenting the one logical path to any components of the computer system that originates or preprocesses a command destined for the peripheral device, receiving the command, and for each received command, selecting one independent physical path on which to route the received command to the peripheral device.
The step of determining the number of independent physical paths to the peripheral device connected to the computer system may further comprise reading all the identification codes uniquely associated with the peripheral device on all the independent physical paths. The unique identification code associated with the peripheral device may be a world wide identification code and/or vital product data.
The step of resolving all the independent physical paths to the peripheral device into one logical path may further comprise determining if there is a duplicative identification code on the independent physical paths thereby indicating that the peripheral device has a plurality of independent physical paths connected to it, and if so, correlating those independent physical paths.
The method of method of managing command and data flow to peripheral devices may further comprise preserving protocol requirements of the selected physical path.
The step of selecting one of the independent physical paths on which to route the command to the peripheral device may further comprise determining the number of functional physical paths to the at least one peripheral device. The selection method may further comprise determining the number of outstanding commands to the peripheral device, and determining if any outstanding command and/or the received command have any required execution attributes. If so, the method may comprise honoring any required execution attributes of the received command and/or of any outstanding commands destined for the peripheral device. If there are any required execution attributes to be honored, then the method may further comprise determining if any outstanding command have any required execution attributes, determining if the received command has any required execution attribute, determining if there are any outstanding commands to the at least one peripheral device on more than one independent physical path, and if so, waiting until only one independent physical path has any outstanding commands for the peripheral device and selecting the physical path with the outstanding commands for the received command.
The method of claim 6 of selecting the independent physical path may further comprise reallocating a received command load to the peripheral device on the independent paths. In conjunction with the reallocation, the step of balancing a command load to the peripheral device on the independent paths may further comprise summing the product of a plurality of load balancing factors and the weight given each factor for each independent physical path and then selecting the independent physical path having the lowest sum. One load balancing factor may be the number of outstanding commands to the at least one peripheral device. Another load balancing factor may be the number of outstanding commands on a physical path to all devices. Still another load balancing factor may be the amount of data associated with an outstanding command on a physical path to the peripheral device. And yet another load balancing factor may comprise the expected latency of outstanding commands on a physical path to the peripheral device. Another load balancing factor may be the expected latency of outstanding commands on a physical path to all devices. Of course, another load balancing factor may comprise the latency of a physical path to the peripheral device.
The step of determining the number of a plurality of independent physical paths to the at least one peripheral device further may comprise detecting that at least one of the plurality of independent physical paths to the at least one peripheral device has failed, rerouting the received command to a functional physical path, and ensuring the at least one peripheral device is in a state ready to accept the rerouted command. The failed physical path may be repaired concurrently with rerouting the received command. After the failed path has been repaired, the failed path may be used.
As another embodiment, the invention may be considered a computer system for transferring commands to a peripheral device, comprising a central processing unit to execute an operating system and at least one device driver application program applicable to at least one peripheral device; a main memory connected to the central processing unit with a memory bus; at least one peripheral device attached to the central processing unit and the main memory; a plurality of independent physical paths connecting the central processing unit and main memory with the at least one peripheral device; and a redundancy manager connected between the at least one peripheral device and the host system bus to dynamically manage each command to the at least one peripheral device without intervention of the operating system and/or the at least one device driver application program. The independent pathways need not have the same protocols. The redundancy manager may comprise an input/output adapter.
In any event, the redundancy manager manages commands on the plurality of independent physical paths independent of command processing and independent of the protocols of the independent physical paths. The redundancy manager may further comprise a path determiner which dynamically chooses for each command the independent path for the command to the peripheral device. The redundancy manager may also further comprise a path resolver that resolves all the independent physical paths to the peripheral device into one logical path presented to the operating system, the device driver application program, the command processing. Still, the redundancy manager may further comprise a load balancer that balances the command load across the independent physical paths. Another feature which may comprise part of the redundancy manager is an ordering maintainer which preserves ordering semantics of the protocols of the independent physical paths. The redundancy manager may also have a rerouter to reroutes commands/data from a failed independent physical path to a functional independent physical path connected to the peripheral device. A path repair detector that detects when the failed independent physical is once again functional within the redundancy manager allows it to manage commands on the recovered path.
The invention may also be considered an I/O adapter connected between a central processing unit having an operating system and a plurality of device driver applications and a plurality of external peripheral devices of which at least one of the external peripheral devices has a multiported connection to independent physical paths connected to the I/O adapter. The I/O adapter having a redundancy manager comprising means to detect the number of independent physical paths to the at least one external peripheral device; means to resolve more than one independent physical path to the same external peripheral device into one logical pathway; means to present the one logical pathway to the central processing unit and to any command/data processing prior to the redundancy manager; means to receive a command/data intended for the peripheral device; means to dynamically determine the optimum independent physical path for the received command/data to the peripheral device; means to preserve the protocols and ordering semantics of the independent physical paths to the peripheral device; means to detect if an independent physical path has failed; means to reroute a command from the failed independent physical path; means to detect that the failed independent physical path has recovered; and means to automatically use the recovered independent physical path.
The method is also a program product for use in a computer network for managing multiple independent physical pathways connected to a peripheral device, comprising a signal-bearing medium carrying thereon a redundancy manager comprising: a detector of all multiple independent paths connected to the peripheral device; a resolver to project to the computer network one logical pathway to the peripheral device; a path calculator which determines an optimum pathway of the multiple independent physical paths for transit of incoming commands/data to the peripheral device; a deferral agent to defer ordering semantics of the incoming and any outstanding commands/data intended for the peripheral device to a protocol of the multiple independent paths; and a selector operable for each incoming command/data to determine an appropriate path considering the results of the path calculator and the deferral agent. The detector may notify the selector that one or more of the multiple independent paths have failed so that the selector reroutes the incoming command/data to another of the multiple independent paths. The program product may further comprise a state resetter to reset all the multiple independent paths other than the failed path(s) into a state to accept the incoming command/data. A recovery notifier to begin using the failed one of the multiple independent paths when the failure has been corrected may also be within the program product.
The invention has thus been summarized but is best understood with reference to the Drawing and the detailed description of the preferred embodiments of the invention in which: